package com.javasix;

//继承
public class Demo1 extends Thread {
    @Override
    public void run() {
        //todo
        for (int i = 0; i <5 ; i++) {
           try {
               Thread.sleep(2000);
           }catch (Exception e){
               e.printStackTrace();
           }
           System.out.println("线程"+Thread.currentThread().getName());
        }

    }
}
